<!doctype html>
<!--
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>
  <meta charset="utf-8">
  <script src="../../node_modules/@webcomponents/webcomponentsjs/webcomponents-bundle.js"></script>
  <script src="wct-browser-config.js"></script>
  <script src="../../node_modules/wct-browser-legacy/browser.js"></script>
  <script type="module" src="../../lib/utils/case-map.js"></script>
</head>
<body>

<script type="module">
import { camelToDashCase, dashToCamelCase } from '../../lib/utils/case-map.js';
suite('case-map', function() {
  test('camelToDashCase converts to dashes', function() {
    assert.equal(camelToDashCase('camelCase'), 'camel-case');
    assert.equal(camelToDashCase('camelCCase'), 'camel-c-case');
  });

  test('dashToCamelCase converts to camelCase', function() {
    assert.equal(dashToCamelCase('camel-case'), 'camelCase');
    assert.equal(dashToCamelCase('camel-c-case'), 'camelCCase');
  });

  test('camelToDashCase and dashToCamelCase reverse the other function', function() {
    var camelCase = dashToCamelCase('camel-c-case');
    assert.equal(camelToDashCase(camelCase), 'camel-c-case');
  });
});
</script>
